<template>
  <div>
    <el-button @click="showD">弹出框</el-button>
    <Dialog
        :show="rr"
        @close="beforeClose"
        width="500px">
      <div slot="title">刚定的标题</div>
      <div>
        内容哈
      </div>
      <div slot="foot">
        <el-button @click="rr=false">取消</el-button>
        <el-button>确认</el-button>
      </div>
    </Dialog>
  </div>
</template>
<script>
import Dialog from "../../components/dialog";
export default {
  components:{
    Dialog
  },
  props:{
    width:{
      default:"500px",
      type:String,

    }
  },
  mounted(){

  },
  data(){
    return{
      rr:false,
      dialogVisible:false,
    }
  },
  methods:{
    beforeClose(){
      this.rr=false
    },
    showD(){
      // this.dialogVisible=true
      // const dom = document.querySelector('.el-dialog')
      // dom.style.display="block"
      this.rr = true
    },
    closeD(){
      this.dialogVisible=false
    },
    handleClose(){
      this.$emit('close')
    }
  }
}
</script>
<style scoped>

</style>